package com.hnas.oracle.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hnas.core.util.StringUtil;
import com.hnas.oracle.dao.MrchDAO;
import com.hnas.oracle.orm.Mrch;
import com.hnas.trade.dto.DTOResultTransApp;
import com.hnas.trade.dto.DTOSearchTrans;

@Component("mrchService")
@Transactional(isolation = Isolation.READ_COMMITTED, readOnly = false, propagation = Propagation.REQUIRED, value = "transactionManagerHnt")
public class MrchServiceImpl implements MrchService {
	
	/**
	 * 
	 */
	@Autowired
	private MrchDAO mrchDAO;

	@Override
	public Mrch getMrchByMrchId(String mrchID) {
		if (StringUtil.isNotEmpty(mrchID)) {
			return this.mrchDAO.getMrchByMrchId(mrchID);
		}
		return null;
	}

	@Override
	public List<DTOResultTransApp> searchTransAppNew(DTOSearchTrans dtoSearchTrans) {
		return this.mrchDAO.searchTransAppNew(dtoSearchTrans);
	}

}
